<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "d_try.money_table".
 *
 * @property integer $uid
 * @property integer $member_uid
 * @property integer $order_id
 * @property double $money
 * @property double $start_money
 * @property double $end_money
 * @property string $memo
 * @property integer $type
 * @property integer $modify_uid
 * @property string $modify_ip
 * @property integer $addtime
 */
class MoneyTable extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'tmall1.money_table';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['member_uid', 'order_id', 'type', 'modify_uid', 'addtime'], 'integer'],
            [['money', 'start_money', 'end_money'], 'number'],
            [['memo'], 'string', 'max' => 255],
            [['modify_ip'], 'string', 'max' => 20],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'uid' => 'Uid',
            'member_uid' => '会员UID',
            'order_id' => '订单id',
            'money' => '金额',
            'start_money' => '起始金额',
            'end_money' => '结束金额',
            'memo' => '备注',
            'type' => '1购物消费 2后台操作 3取消订单',
            'modify_uid' => '修改人UID',
            'modify_ip' => '修改人IP',
            'addtime' => '添加时间',
        ];
    }

    /**
     * @inheritdoc
     * @return \services\models\MoneyTableQuery the active query used by this AR class.
     */
    public static function find()
    {
        return new \services\models\MoneyTableQuery(get_called_class());
    }
}
